{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://www.0xaa55.com/thread-26113-1-1.html"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A[行][列]\n",
    "\n",
    "b[行]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import copy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "A: [[1, 4, 1], [2, 2, 3]]\n",
      "A[0]: [1, 4, 1]\n",
      "A[0][1]: 4\n",
      "A的行数，len(A): 2\n",
      "A的列数，len(A[0]): 3\n",
      "b[0] 0\n",
      "b的行数，len(b) 3\n"
     ]
    }
   ],
   "source": [
    "A = [[1, 4, 1], [2, 2, 3]]\n",
    "b = [0, 3, 2] # b默认只有一列\n",
    "\n",
    "print(\"A:\", A)\n",
    "print(\"A[0]:\", A[0]) # 打印第0行\n",
    "print(\"A[0][1]:\", A[0][1]) # 打印第0行第1列元素\n",
    "print(\"A的行数，len(A):\", len(A))  # len(A)是A的行数\n",
    "print(\"A的列数，len(A[0]):\", len(A[0])) # len(A[0])是A的列数\n",
    "\n",
    "print(\"b[0]\",b[0])\n",
    "print(\"b的行数，len(b)\", len(b))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 打印矩阵\n",
    "def ShowMatrix(matrix):\n",
    "    print(\"=================\")\n",
    "    rows = len(matrix)\n",
    "    # 按行打印\n",
    "    for i in range(rows):\n",
    "        print(matrix[i][:])\n",
    "    print(\"=================\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 高斯消元\n",
    "def GaussMethod(A, b):\n",
    "    U = copy.deepcopy(A)\n",
    "    c = copy.deepcopy(b)\n",
    "    \n",
    "    # 获取矩阵的行数和列数\n",
    "    rows = len(U)\n",
    "    cols = len(U[0])\n",
    "\n",
    "    # 对应step1等：主元个数等于行数，执行“主元个数-1”次\n",
    "    for i in range(rows-1):\n",
    "        # 对应step1.1等：主元下面的每一行都进行消元\n",
    "        for target in range(i+1, rows):\n",
    "            # 对应step1.1.1等：如果主元下面的某一行元素为0，则跳过。\n",
    "            if U[target][i] == 0:\n",
    "                continue\n",
    "            # 对应step1.1.2等：变换系数 = 「目标行，主元下的元素」除以「主元」\n",
    "            coeff = U[target][i] / U[i][i]\n",
    "            # 对应step1.1.3等：新目标行 = 目标行 - 变换系数 * 主元行\n",
    "            for col in range(cols):\n",
    "                U[target][col] = U[target][col] - coeff * U[i][col]\n",
    "            # 对应step1.1.4等：新b[目标行] = 目标行 - 变换系数 * b[主元行]\n",
    "            c[target] = c[target] - coeff * c[i]\n",
    "\n",
    "    return U, c"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Python创建二维数组的正确姿势 - 极客猴的文章 - 知乎\n",
    "https://zhuanlan.zhihu.com/p/88197389"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 创建单位矩阵I\n",
    "def CreateI(n):\n",
    "    I = [[0 for i in range(n)] for j in range(n)]\n",
    "    for i in range(n):\n",
    "        I[i][i] = 1\n",
    "    return I"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 向量点乘\n",
    "def DotProduct(X1, X2):\n",
    "    x1_rows = len(X1)\n",
    "    x1_cols = len(X1[0])\n",
    "    x2_rows = len(X2)\n",
    "    x2_cols = len(X2[0])\n",
    "\n",
    "    if x1_cols != x2_rows:\n",
    "        print(\"X1的列数不等于X2的行数，无法进行点乘\")\n",
    "        return\n",
    "    \n",
    "    y = [[0 for i in range(x1_rows)] for j in range(x2_cols)]\n",
    "\n",
    "    for row in range(x1_rows):\n",
    "        for col in range(x2_cols):\n",
    "            for i in range(x1_cols):\n",
    "                y[row][col] = y[row][col] + X1[row][i] * X2[i][col]\n",
    "\n",
    "    return y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 矩阵视角的高斯消元\n",
    "# 输入：主元不为0，可逆且不需换行的矩阵$A$\n",
    "# 输出：上三角矩阵U；能一次将A变为U的矩阵E\n",
    "def MatrixElimination(A):\n",
    "    U = copy.deepcopy(A)\n",
    "\n",
    "    rows = len(U)\n",
    "    cols = len(U[0])\n",
    "    E = CreateI(rows)\n",
    "\n",
    "    for i in range(rows-1):\n",
    "        for target in range(i+1, rows):\n",
    "            if U[target][i] == 0:\n",
    "                continue\n",
    "            tempE = CreateI(rows)\n",
    "            tempE[target][i] = - (U[target][i] / U[i][i])\n",
    "            U = DotProduct(tempE, U)\n",
    "            E = DotProduct(tempE, E)\n",
    "\n",
    "    return U, E"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 回代法\n",
    "def BackSubstitution(U, c):\n",
    "    # 获取矩阵的行数和列数\n",
    "    rows = len(U)\n",
    "    cols = len(U[0])\n",
    "\n",
    "    # 定义用于存储结果的向量，全部初始化为0\n",
    "    x = [0] * cols\n",
    "\n",
    "    # 求出最后一个未知数\n",
    "    x[len(x)-1] = c[cols-1] / U[cols-1][cols-1]\n",
    "\n",
    "    # 对应step1等：从倒数第二行到第一行\n",
    "    for i in range(rows-2, -1, -1):\n",
    "        # 对应step1.1等：代入已求出的值\n",
    "        for j in range(i, cols-1):\n",
    "            c[i] = c[i] - U[i][j+1] * x[j+1]\n",
    "        # 对应step1.2等：求出新的未知数\n",
    "        x[i] = c[i] / U[i][i]\n",
    "     \n",
    "    return x"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "检验：\n",
    "1. 高斯消元和回代法\n",
    "2. 矩阵视角的高斯消元"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "A = [[1, 2, 1], [3, 8, 1], [0, 4, 1]]\n",
    "b = [2, 12, 2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "高斯消元和回代：\n",
      "U =  [[1, 2, 1], [0.0, 2.0, -2.0], [0.0, 0.0, 5.0]]\n",
      "c =  [2, 6.0, -10.0]\n",
      "x =  [2.0, 1.0, -2.0]\n"
     ]
    }
   ],
   "source": [
    "U, c = GaussMethod(A, b)\n",
    "\n",
    "print(\"高斯消元和回代：\")\n",
    "print(\"U = \", U)\n",
    "print(\"c = \", c)\n",
    "\n",
    "x = BackSubstitution(U, c)\n",
    "print(\"x = \", x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "矩阵视角的高斯消元：\n",
      "U =  [[1.0, 2.0, 1.0], [0.0, 2.0, -2.0], [0.0, 0.0, 5.0]]\n",
      "E =  [[1.0, 0.0, 0.0], [-3.0, 1.0, 0.0], [6.0, -2.0, 1.0]]\n",
      "test =  [[1.0, 2.0, 1.0], [0.0, 2.0, -2.0], [0.0, 0.0, 5.0]]\n"
     ]
    }
   ],
   "source": [
    "print(\"矩阵视角的高斯消元：\")\n",
    "\n",
    "U, E = MatrixElimination(A)\n",
    "print(\"U = \", U)\n",
    "print(\"E = \", E)\n",
    "\n",
    "test = DotProduct(E, A)\n",
    "print(\"test = \", test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "A = [[1, 1, 1, 1], [1, 2, 4, 8], [1, 3, 9, 27], [1, 4, 16, 64]]\n",
    "b = [3, -2, -5, 0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "高斯消元和回代：\n",
      "U =  [[1, 1, 1, 1], [0.0, 1.0, 3.0, 7.0], [0.0, 0.0, 2.0, 12.0], [0.0, 0.0, 0.0, 6.0]]\n",
      "c =  [3, -5.0, 2.0, 6.0]\n",
      "x =  [4.0, 3.0, -5.0, 1.0]\n"
     ]
    }
   ],
   "source": [
    "U, c = GaussMethod(A, b)\n",
    "\n",
    "print(\"高斯消元和回代：\")\n",
    "print(\"U = \", U)\n",
    "print(\"c = \", c)\n",
    "\n",
    "x = BackSubstitution(U, c)\n",
    "print(\"x = \", x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "矩阵视角的高斯消元：\n",
      "U =  [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 3.0, 7.0], [0.0, 0.0, 2.0, 12.0], [0.0, 0.0, 0.0, 6.0]]\n",
      "E =  [[1.0, 0.0, 0.0, 0.0], [-1.0, 1.0, 0.0, 0.0], [1.0, -2.0, 1.0, 0.0], [-1.0, 3.0, -3.0, 1.0]]\n",
      "test =  [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 3.0, 7.0], [0.0, 0.0, 2.0, 12.0], [0.0, 0.0, 0.0, 6.0]]\n"
     ]
    }
   ],
   "source": [
    "print(\"矩阵视角的高斯消元：\")\n",
    "\n",
    "U, E = MatrixElimination(A)\n",
    "print(\"U = \", U)\n",
    "print(\"E = \", E)\n",
    "\n",
    "test = DotProduct(E, A)\n",
    "print(\"test = \", test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Manim Community <span style=\"color: #008000; text-decoration-color: #008000\">v0.16.0.post0</span>\n",
       "\n",
       "</pre>\n"
      ],
      "text/plain": [
       "Manim Community \u001b[32mv0.\u001b[0m\u001b[32m16.0\u001b[0m\u001b[32m.post0\u001b[0m\n",
       "\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from manim import *\n",
    "\n",
    "COLORS = [BLUE, GREEN, RED]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "列变换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[11/27/22 11:07:53] </span><span style=\"color: #008000; text-decoration-color: #008000\">INFO    </span>                                                               <a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">scene_file_writer.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py#728\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">728</span></a>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">File</span> ready at                                                 <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">'C:\\Users\\27108\\Desktop\\LinearAlgebra\\02_Elimination_with_mat</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">rices\\media\\images\\02_Elimination_with_matrices\\ColumnCombina</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">tions_ManimCE_v0.16.0.post0.png'</span>                              <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>                                                                       <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m[11/27/22 11:07:53]\u001b[0m\u001b[2;36m \u001b[0m\u001b[32mINFO    \u001b[0m                                                               \u001b]8;id=875406;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py\u001b\\\u001b[2mscene_file_writer.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=126360;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py#728\u001b\\\u001b[2m728\u001b[0m\u001b]8;;\u001b\\\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[1;33mFile\u001b[0m ready at                                                 \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32m'C:\\Users\\27108\\Desktop\\LinearAlgebra\\02_Elimination_with_mat\u001b[0m \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32mrices\\media\\images\\02_Elimination_with_matrices\\ColumnCombina\u001b[0m \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32mtions_ManimCE_v0.16.0.post0.png'\u001b[0m                              \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m                                                                       \u001b[2m                        \u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span><span style=\"color: #008000; text-decoration-color: #008000\">INFO    </span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">Rendered</span> ColumnCombinations                                               <a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">scene.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py#240\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">240</span></a>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">Played</span> <span style=\"color: #008000; text-decoration-color: #008000\">0</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">animations</span>                                                       <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">            </span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m                   \u001b[0m\u001b[2;36m \u001b[0m\u001b[32mINFO    \u001b[0m \u001b[1;33mRendered\u001b[0m ColumnCombinations                                               \u001b]8;id=412909;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py\u001b\\\u001b[2mscene.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=846876;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py#240\u001b\\\u001b[2m240\u001b[0m\u001b]8;;\u001b\\\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[1;33mPlayed\u001b[0m \u001b[32m0\u001b[0m \u001b[1;33manimations\u001b[0m                                                       \u001b[2m            \u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1YAAAHgCAYAAACmUPwqAAAjmklEQVR4nO3deZTddX3/8ffsk0wmyWRfIQshLBESwiYqiAQEgQJHoLX+SsW1LQiov58FkbZW69Zf3SpaK3VDEX8gRQRkN4YdErJCAtmXyb5MZjL79vsDCgQymSSfm3vnZh6Pc+45k3y/585rcoZhnnPv3G9BRHQGAAAAB6ww1wMAAADynbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJKwAAAASCSsAAIBEwgoAACCRsAIAAEgkrAAAABIJKwAAgETCCgAAIJGwAgAASCSsAAAAEgkrAACARMIKAAAgkbACAABIJ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BUAAEAiYQUAAJBIWAEAACQSVgAAAImEFQAAQCJhBQAAkEhYAQAAJBJWAAAAiYQVAABAImEFAACQSFgBAAAkElYAAACJhBUAAEAiYQUAAJBIWAEAACQSVgAAAImEFQAAQKL/DzTywEJdRkhPAAAAAElFTkSuQmCC",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%manim -ql ColumnCombinations\n",
    "\n",
    "class ColumnCombinations(Scene):\n",
    "    def construct(self):\n",
    "        A = Matrix([['-', '-', '-'], ['-', '-', '-'], ['-', '-', '-']]).set_column_colors(COLORS[0], COLORS[1], COLORS[2])\n",
    "        x = Matrix([[3], [4], [5]]).set_row_colors(COLORS[0], COLORS[1], COLORS[2])\n",
    "        col0 = Matrix([['-'], ['-'], ['-']]).set_color(COLORS[0])\n",
    "        col1 = Matrix([['-'], ['-'], ['-']]).set_color(COLORS[1])\n",
    "        col2 = Matrix([['-'], ['-'], ['-']]).set_color(COLORS[2])\n",
    "        right = VGroup(\n",
    "            MathTex('3', color=COLORS[0]), col0, MathTex('+'),\n",
    "            MathTex('4', color=COLORS[1]), col1, MathTex('+'),\n",
    "            MathTex('5', color=COLORS[2]), col2\n",
    "        ).arrange(RIGHT)\n",
    "\n",
    "        eq = VGroup(A, x, MathTex('='), right).arrange(RIGHT)\n",
    "\n",
    "        self.add(eq)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "行变换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span><span style=\"color: #008000; text-decoration-color: #008000\">INFO    </span>                                                               <a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">scene_file_writer.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py#728\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">728</span></a>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">File</span> ready at                                                 <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">'C:\\Users\\27108\\Desktop\\LinearAlgebra\\02_Elimination_with_mat</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">rices\\media\\images\\02_Elimination_with_matrices\\RowCombinatio</span> <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #008000; text-decoration-color: #008000\">ns_ManimCE_v0.16.0.post0.png'</span>                                 <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>                                                                       <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">                        </span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m                   \u001b[0m\u001b[2;36m \u001b[0m\u001b[32mINFO    \u001b[0m                                                               \u001b]8;id=912506;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py\u001b\\\u001b[2mscene_file_writer.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=622545;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene_file_writer.py#728\u001b\\\u001b[2m728\u001b[0m\u001b]8;;\u001b\\\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[1;33mFile\u001b[0m ready at                                                 \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32m'C:\\Users\\27108\\Desktop\\LinearAlgebra\\02_Elimination_with_mat\u001b[0m \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32mrices\\media\\images\\02_Elimination_with_matrices\\RowCombinatio\u001b[0m \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[32mns_ManimCE_v0.16.0.post0.png'\u001b[0m                                 \u001b[2m                        \u001b[0m\n",
       "\u001b[2;36m                    \u001b[0m                                                                       \u001b[2m                        \u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span><span style=\"color: #008000; text-decoration-color: #008000\">INFO    </span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">Rendered</span> RowCombinations                                                  <a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">scene.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py#240\" target=\"_blank\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">240</span></a>\n",
       "<span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">                    </span>         <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">Played</span> <span style=\"color: #008000; text-decoration-color: #008000\">0</span> <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">animations</span>                                                       <span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">            </span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[2;36m                   \u001b[0m\u001b[2;36m \u001b[0m\u001b[32mINFO    \u001b[0m \u001b[1;33mRendered\u001b[0m RowCombinations                                                  \u001b]8;id=880541;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py\u001b\\\u001b[2mscene.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=551121;file://d:\\Devtools\\Anaconda\\envs\\new\\lib\\site-packages\\manim\\scene\\scene.py#240\u001b\\\u001b[2m240\u001b[0m\u001b]8;;\u001b\\\n",
       "\u001b[2;36m                    \u001b[0m         \u001b[1;33mPlayed\u001b[0m \u001b[32m0\u001b[0m \u001b[1;33manimations\u001b[0m                                                       \u001b[2m            \u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA1YAAAHgCAYAAACmUPwqAAAekklEQVR4nO3deZjdBX3v8e+sSWYmC5mQfSELwchOooAIBAEFHrVyq0itVZ/29lqv1j60tUW5iJVe1yKPpdprqb1Wr1jl3ipYEjWsTQhIQkoACZCN7HvINjPJTGbm/qEEp9kw35P5nZN5vf7K/M7Pw8d5Hpi855zf71RFRHcAAABwzKqLHgAAAFDphBUAAECSsAIAAEgSVgAAAEnCCgAAIElYAQAAJAkrAACAJGEFAACQJKwAAACShBUAAECSsAIAAEgSVgAAAEnCCgAAIElYAQAAJAkrAACAJGEFAACQJKwAAACShBUAAECSsAIAAEgSVgAAAEnCCgAAIElYAQAAJAkrAACAJGEFAACQJKwAAACShBUAAECSsAIAA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IAkYQUAAJAkrAAAAJKEFQAAQJKwAgAASBJWAAAAScIKAAAgSVgBAAAkCSsAAIAkYQUAAJAkrAAAAJKEFQAAQJKwAgAASBJWAAAAScIKAAAgSVgBAAAkCSsAAIAkYQUAAJAkrAAAAJKEFQAAQJKwAgAASPr/e1spRSElTKsAAAAASUVORK5CYII=",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%%manim -ql RowCombinations\n",
    "\n",
    "class RowCombinations(Scene):\n",
    "    def construct(self):\n",
    "        A = Matrix([['-', '-', '-'], ['-', '-', '-'], ['-', '-', '-']]).set_row_colors(COLORS[0], COLORS[1], COLORS[2])\n",
    "        x = Matrix([[1, 2, 7]]).set_column_colors(COLORS[0], COLORS[1], COLORS[2])\n",
    "\n",
    "        line0 = VGroup(MathTex('1'), Matrix([['-', '-', '-']])).arrange(RIGHT).set_color(COLORS[0])\n",
    "        line1 = VGroup(MathTex('2'), Matrix([['-', '-', '-']])).arrange(RIGHT).set_color(COLORS[1])\n",
    "        line2 = VGroup(MathTex('7'), Matrix([['-', '-', '-']])).arrange(RIGHT).set_color(COLORS[2])\n",
    "\n",
    "        right = VGroup(\n",
    "            line0, MathTex('+'),\n",
    "            line1, MathTex('+'),\n",
    "            line2\n",
    "        ).arrange(DOWN, buff=0.4)\n",
    "\n",
    "        eq = VGroup(x, A, MathTex('='), right).arrange(RIGHT)\n",
    "\n",
    "        self.add(eq)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  },
  "vscode": {
   "interpreter": {
    "hash": "a045e4431ffd8513cc3dbf8da28750ecc933a5bdc7eb2f9318e5ad089d534439"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
